<?php

namespace app\index\controller;

use app\index\model\Banner as BannerModel;
use app\index\model\Config as ConfigModel;
use think\Controller;
use think\Request;

class Product extends BaseController
{
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $banner = BannerModel::getBanner('social');
        $action = $request->action();
        $this->assign('banner', $banner);
        $this->assign('action', $action);
    }

    /**
     * 吸油丸
     */
    public function oilpill()
    {
        $oilpill = ConfigModel::getBaseValue('oilpill');
        $this->assign('oilpill', $oilpill);
        return $this->fetch("product-oilpill");
    }

    /**
     * 清清梅
     */
    public function qinqinplum()
    {
        $qinqinplum = ConfigModel::getBaseValue('qinqinplum');
        $this->assign('qinqinplum', $qinqinplum);
        return $this->fetch("product-qinqinplum");
    }

    /**
     * SOSO棒
     */
    public function sosostick()
    {
        $sosostick = ConfigModel::getBaseValue('sosostick');
        $this->assign('sosostick', $sosostick);
        return $this->fetch("product-sosostick");
    }

    /**
     * 夜间嗨吃
     */
    public function yjhc()
    {
        $yjhc = ConfigModel::getBaseValue('yjhc');
        $this->assign('yjhc', $yjhc);
        return $this->fetch("product-yjhc");
    }
}
